//package com.gonsin.ta.logic.proto;
//
//import io.grpc.Server;
//import io.grpc.ServerBuilder;
//import org.springframework.beans.factory.InitializingBean;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import java.io.IOException;
//
//@Configuration
//public class GRpcConfig  {
//
//    /**
//     * cli服务监听端口
//     */
//    @Value("${com.gonsin.ta.cli.port:10883}")
//    private int cliPort;
//
//    @Bean
//    public TaCliServiceImpl taCliService(){
//        return new TaCliServiceImpl();
//    }
//
////    @Bean
////    public Server taCliServer() throws IOException {
////        try {
////            return ServerBuilder.forPort(cliPort)
////                    .addService(taCliService())
////                    .intercept(new JwtServerInterceptor())
////                    .build()
////                    .start();
////        } catch (Exception ex){
////            cliPort ++;
////            return taCliServer();
////        }
////    }
//}